appium#52 Add @FindBy annotations for appium's extra locator strategies#68
appium#52 Add @FindBy annotations for appium's extra locator strategies#68Jonahss merged 1 commit intoappium:masterfrom TikhomirovSergey:master
Conversation
|
Please squash to one commit. |
|
I think @Jonahss will want to review this and he's on vacation for a few more days--thanks a ton for the work! |
|
Is squashed. |
|
Awesome! |
|
Cool! Looks great! |
|
Hello! I posted a question to the Annotations into https://discuss.appium.io/t/java-client-1-6-0-findby-annotations-vs-driver-find/88 |
|
I'm bit confused on this implementation. Correct me if I'm doing wrong here: Are these annotations only works for web ui, not for native? |
|
Hi @email2vimalraj @FindBy(id="testid") //id in HTML DOM
@AndroidFindBy(id="androidtestid") //id of Android native UI element
@iOSFindBy(id="iostestid") //id of iOS native UI element
RemoteWebElement testElement; //I advice you to use RemoteWebElement for super crossplatform
//scripts because of problems with touch actions that are going to be resolvedshould work. Otherwice please open an issue. |
WebElement can be instantiated by these ways:
or
or
Now old browser page objects can be reusable with this decorator:
or
I made some tests. If there is not enough please add your own.